package stdio.costa.imoca.validator;

import stdio.costa.imoca.exception.MocaUserValidationException;
import stdio.costa.imoca.model.MocaUser;

public class MocaUserValidator {

	public static void validateBasicUserInformation(MocaUser mocaUser) {
		if (!validateEmail(mocaUser.getEmail())) {
			throw new MocaUserValidationException();
		}
		if (!validateUsername(mocaUser.getName())) {
			throw new MocaUserValidationException();
		}
	}

	public static boolean validateEmail(String email) {
		if (null == email) {
			return false;
		}
		return true;
	}

	public static boolean validateUsername(String username) {
		if (null == username) {
			return false;
		}
		return true;
	}

}
